package cn.zyjblogs.starter.web.autoconfig;

import cn.zyjblogs.starter.web.hander.GlobalExceptionHandler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhuyijun
 */
@Configuration
public class GlobalExceptionHandlerAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean(
            name = {"globalExceptionHandler"}
    )
    public GlobalExceptionHandler globalExceptionHandler() {
        return new GlobalExceptionHandler();
    }

}
